package models

import "gorm.io/gorm"

type Rider struct {
	gorm.Model
	Name    string `gorm:"type:varchar(60);not null;commit:'名称'"`
	Soles   int64  `gorm:"type:int;not null;commit:'骑手评分'"`
	OrderId int64  `gorm:"type:int;not null;commit:'订单Id'"`
	Status  int64  `gorm:"type:int;not null;commit:'骑手状态:1-在线,2-离线'"`
}

func (r *Rider) RiderAdd() error {
	return DB.Create(&r).Error
}
